Xbasic
SQL::IndexInfoAddColumn Method
Syntax
Result_Flag as L = <SQL::IndexInfo>.AddColumn(Column as SQL::IndexColumnInfo)
Arguments
- Result_Flag
TRUE (.T.) if the operation was successful; otherwise FALSE (.F.).
- <SQL::IndexInfo>
A SQL::IndexInfo object and having (at a minimum) a value for the .name property.
- Column
A SQL::IndexColumnInfo object and having (at a minimum) a value for the .name property.
Description
Add a Column.
Discussion
The AddColumn() method adds a new column definition to an index definition.
Example
dim IndexInfo as SQL::IndexInfo dim IndexColumn as SQL::IndexColumnInfo
The .Name properties of the SQL::IndexInfo and SQL::IndexColumnInfo objects are required before calling the AddColumn() method.
IndexInfo.Name = "Primary_Key" IndexInfo.PrimaryKey = .t. IndexColumn.Name = "MyColumnName" if .not. IndexInfo.AddColumn(IndexColumn) then ui_msg_box("Error", "Could not add index") end if ui_msg_box("Index Column Definition", IndexInfo.XML)
See Also